package com.edgar.music;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.edgar.music.artist.ArtistManager;
import com.edgar.music.artist.entity.ArtistList;
import com.edgar.music.artist.type.LanguageType;
import com.edgar.music.artist.type.SingerCategoryType;
import com.edgar.music.network.RequestCallback;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ArtistManager.getInstance().getArtistList(LanguageType.Chinese, SingerCategoryType.MALE, "", 0, 20, new RequestCallback<ArtistList>() {
            @Override
            public void onSuccess(ArtistList result) {
                System.out.println("Result:"+result.artistList.get(0).country);
            }

            @Override
            public void onException(Throwable e) {}

            @Override
            public void onFailure(int errorCode, String message) {
                System.out.println(errorCode);
            }
        });
    }
}
